﻿using Tools.Domain.Common.StateMachine;
using Web.App.Infrastructure.Mail.Contracts;
using Webshop20.AntiCorruptionLayers.Amazon.Services.Contracts;
using Webshop20.Domain.Orders.Translations;
using Webshop20.Domain.Stock.Services;

namespace Webshop20.Domain.Orders.Processes.Events
{
    public class ExecuteOrderEvent : IStateEvent
    {
        private readonly IMailService mailService;
        private readonly ITemplateService templateService;
        private readonly IGoodReservationService goodReservationService;
        private readonly IGoodTranslator goodTranslator;
        private readonly IAmazonDistributorService amazonDistributorService;
        private readonly INotificationMailTranslator notificationMailTranslator;

        public ExecuteOrderEvent(
                                ITemplateService templateService, 
                                IMailService mailService, 
                                IGoodReservationService goodReservationService, 
                                IGoodTranslator goodTranslator, 
                                IAmazonDistributorService amazonDistributorService, 
                                INotificationMailTranslator notificationMailTranslator
                            )
        {
            this.templateService = templateService;
            this.notificationMailTranslator = notificationMailTranslator;
            this.amazonDistributorService = amazonDistributorService;
            this.goodTranslator = goodTranslator;
            this.goodReservationService = goodReservationService;
            this.mailService = mailService;
        }

        public INotificationMailTranslator NotificationMailTranslator
        {
            get { return notificationMailTranslator; }
        }

        public IAmazonDistributorService AmazonDistributorService
        {
            get { return amazonDistributorService; }
        }

        public IGoodTranslator GoodTranslator
        {
            get { return goodTranslator; }
        }

        public IGoodReservationService GoodReservationService
        {
            get { return goodReservationService; }
        }

        public ITemplateService TemplateService
        {
            get { return templateService; }
        }

        public IMailService MailService
        {
            get { return mailService; }
        }
    }
}
